04. Lab I: Build a Dog REST API (Set Up)

Lab I: Build a Dog REST API

Throughout this lesson, you will work to create a REST API that returns a list of dogs from an embedded H2 in memory database. Note that you will build on this code throughout each of the lesson's labs, so while it starts with just a small piece, it will get bigger as we go.

Set Up

  • Step 1: Use Spring Initializr to bootstrap a simple project.
    • Add the H2 Database, Spring Web Starter, and the Spring Data JPA dependencies before generating the project.
  • Step 2: Set-up the H2 in-memory database.
    • Enable the console, add a path for the console, and create a url for the datasource using H2.